<template>
  <div class="main-index">
    <div class="main-nav">
      <span @click="goto('index')">主页</span>
      <span @click="goto('news')">新闻</span>
      <span @click="goto('PE')">体育</span>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "VueHomeworkTwoApp",

  data() {
    return {};
  },

  mounted() {},

  methods: {
    goto(name) {
      this.$router.push({
        name,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>